#ifndef _IM_SERVER_USER_PROFILE_UPDATE_REDIS_TASK_
#define _IM_SERVER_USER_PROFILE_UPDATE_REDIS_TASK_

#include <string>
#include "ImServiceCommon_types.h"
#include "redis_task_manager.h"

namespace imserver {

using apache::thrift::concurrency::Runnable;

class UpdateRedisTask : public Runnable {
 public:
  UpdateRedisTask(const UserProfile & user, int ttl) : user_profile_(user), redis_ttl_(ttl) {}
  UpdateRedisTask(int64_t uid, int ttl);

  virtual void run();
 private:
  UserProfile user_profile_;
  int redis_ttl_;
};

}

#endif // _IM_SERVER_USER_PROFILE_UPDATE_REDIS_TASK_

